updating oE or_bits
or_bits
<built-in> function or_bits(object a, object b)
performs the bitwise OR operation on corresponding bits in two objects. A bit in the result will be 1 only if the corresponding bits in both arguments are both 0.
Parameters:
- a : one of the objects involved
- b : the second object
Returns:
An object, whose shape depends on the shape of both arguments. Each atom in this object is obtained by bitwise OR between atoms on both objects.
Comments:
The arguments must be representable as 32-bit numbers, either signed or unsigned.
If you intend to manipulate full 32-bit values, you should declare your variables as atom, rather than integer. Euphoria's integer type is limited to 31-bits.
Results are treated as signed numbers. They will be negative when the highest-order bit is 1.
Example 1:
a = or_bits(#0F0F0000, #12345678) -- a is #1F3F5678
Example 2:
a = or_bits(#FF, {#123456, #876543, #2211}) -- a is {#1234FF, #8765FF, #22FF}
See Also:
Not Categorized, Please Help
|